<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	prdNm		= Request("prdNm")
	
	SQLTitle = "-- ■■■■ 제품코드 콤보 ■■■■"
	
	'## 검색조건에 따른 조건절 만들기 
	If prdNm <> "" Then 
		addSql = " prdNm LIKE '%" & prdNm & "%' "
	End If 
	If addSql <> "" Then 
		addSql = " WHERE flag='Y' AND " & addSql 
	End If 

	SQL = "SELECT prdCd, prdNm FROM tblProduct " & addSql & " ORDER BY prdNm" 

	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

	Set Rs=Server.CreateObject("ADODB.RecordSet")
	Rs.open SQL, DbCon, 1
	
	Response.write "<Prducts>" & vbcrlf

	If Rs.eof Or Rs.bof Then 
	Else 
		Do Until Rs.eof Or Rs.bof
		
			Response.write "	<PrdList>" & vbcrlf
				Call mkXMLNode("prdCd", rs("prdCd"), 2)
				Call mkXMLNode("prdNm", rs("prdNm"), 2)
			Response.write "	</PrdList>" & vbcrlf

		Rs.movenext
		Loop 
	End If
	Response.write "</Prducts>" & vbcrlf
'	Call rsWithXML("Save OK!")
%>